package Chapter06;

public class Zuoye20 {
    //20.定义一个整数数组，输出比平均值大的数
    public static void main(String[] args) {
        int array[] ={1,20,4,21,45};
        int sum=0;
        int avg=1;
        for (int i:array)
            sum+=i;
        avg =sum/array.length;
        for (int i:array)
        {
            if (i>avg){
                System.out.println("比平均数大的有:"+i);
            }
        }
    }
}
